package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.PlanningDao;
import com.aerotechnic.entities.Planning;
import com.aerotechnic.service.interfaces.PlanningBoIn;

@Service("PlanningBo")
@Transactional
public class PlanningBo implements PlanningBoIn {
	
	@Autowired
	private PlanningDao planningDao;

	@Override
	public void save(Planning myEntity) {
		// TODO Auto-generated method stub
		planningDao.save(myEntity);
		
	}

	@Override
	public void update(Planning myEntity) {
		// TODO Auto-generated method stub
		planningDao.update(myEntity);
		
	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub
		planningDao.delete(id);
	}

	@Override
	public Planning findByID(int id) {
		// TODO Auto-generated method stub
		return planningDao.findByID(id);
	}

	@Override
	public List<Planning> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Planning getLastPlanning() {
		// TODO Auto-generated method stub
		return planningDao.getLastPlanning();
	}

}
